def solution(A):
    """
    此函数用于计算给定分数列表中会说谎的学生数量。

    参数：
    - A:包含学生分数的列表。

    返回：
    - 会说谎的学生数量。
    """
    n = len(A)
    liars = 0
    for i in range(n):
        score = A[i]
        # 统计分数小于等于当前分数的学生数量
        lower_or_equal_count = sum(1 for s in A if s <= score)
        # 计算分数比当前分数高的学生数量
        higher_count = n - lower_or_equal_count
        # 如果分数小于等于当前分数的学生数量多于分数比当前分数高的学生数量，则该学生说谎
        if lower_or_equal_count > higher_count:
            liars += 1
    return liars


if __name__ == "__main__":
    # Add your test cases here
    print(solution([100, 100, 100]) == 3)
    print(solution([2, 1, 3]) == 2)
    print(solution([30, 1, 30, 30]) == 3)
    print(solution([19, 27, 73, 55, 88]) == 3)
    print(solution([19, 27, 73, 55, 88, 88, 2, 17, 22]) == 5)
